<template>
    <div class="y-toptip" :class="[typeClass,animation]"  v-html="msg"></div>
</template>

<script type="text/babel">
    export default {
        data() {
            return {
                animation: ''
            }
        },
        props: {
            msg: String,
            type:String,
            timeout: Number,
            callback: Function
        },
        computed: {
            typeClass() {
                let _type = '';
                if (this.type === 'success' || this.type === 'error') {
                    _type = 'y-toptip-' + this.type;
                    
                }
                return _type;
            }
        }
    }
</script>

